﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Entity;
using DAL;

namespace BLL
{
    public class X_BShopcart
    {
         //根据id查询图书信息
        public static List<BookInformatica> Getbookinfo(int id)
        {
            return X_Shopcart.Getbookinfo(id);
        }
          //查询购物车是否存在已有商品
        public static List<CartItem> Getcaritem(int bookid, int cid)
        {
            return X_Shopcart.Getcaritem(bookid, cid);
        }
        //根据用户id查询是否有购物车
        public static int Carnum(int id)
        {
            return X_Shopcart.Carnum(id);
        }
        //添加购物车
        public static int Insertcart(int sc)
        {
            return X_Shopcart.Insertcart(sc);
        }
          //添加购物车详情
        public static int Insertcaritem(CartItem item, int cid)
        {
            return X_Shopcart.Insertcaritem(item,cid);
        }


        //获取购物车的所有数据
        public static List<CartItem> Get(int uid)
        {
            return X_Shopcart.Get(uid);
        }


        //修改购物车
        public static int Updatashop(int num, int bookid, int cartid)
        {
            return X_Shopcart.Updatashop(num,bookid,cartid);
        }
          
        //删除
        public static int Delshop(int bookid, int carid)
        {
            return X_Shopcart.Delshop(bookid,carid);
        }
    }
}
